//
//  SYS_LoginTextView.m
//  System_App
//
//  Created by 魏配军 on 2017/11/28.
//  Copyright © 2017年 czy001. All rights reserved.
//

#import "SYS_LoginTextView.h"

@implementation SYS_LoginTextView

-(instancetype)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        _bgView=[UIView new];
        _bgView.backgroundColor=[UIColor clearColor];
        _bgView.layer.borderWidth=0.8;
        _bgView.layer.borderColor=RGBACOLOR(1,174,255,0.6).CGColor;
        _bgView.layer.masksToBounds=YES;
        _bgView.layer.cornerRadius=20;
        
        _iconImageView=[UIImageView new];
        
        _inputTextFiled=[SYS_CustomFiled new];
        _inputTextFiled.font=[UIFont systemFontOfSize:14];
        _inputTextFiled.textColor=[UIColor blackColor];
        _inputTextFiled.tintColor=MainColor;
        _inputTextFiled.clearButtonMode =UITextFieldViewModeWhileEditing;
        _inputTextFiled.keyboardType=UIKeyboardTypeNumbersAndPunctuation;
        
        [self sd_addSubviews:@[_bgView]];
        
        _bgView.sd_layout
        .leftSpaceToView(self, 40)
        .topSpaceToView(self, 10)
        .widthIs(SCREENWIDTH-80)
        .heightIs(40);
        
        [_bgView sd_addSubviews:@[_iconImageView,_inputTextFiled]];
        
        _iconImageView.sd_layout
        .leftSpaceToView(_bgView, 20)
        .topSpaceToView(_bgView, 10)
        .widthIs(18)
        .heightIs(20);
        
        _inputTextFiled.sd_layout
        .leftSpaceToView(_iconImageView, 20)
        .topSpaceToView(_bgView, 10)
        .widthIs(SCREENWIDTH-150)
        .heightIs(20);
        
    }
    return self;
    
}






@end
